﻿using System.Composition;
using Avalonia;
using torch.plugin;
using Avalonia.Controls;

namespace torch.plugin_sample;

[Export(typeof(IPlugin))]
public class SamplePlugin : IPlugin, IDisposable
{
    public string Id => "TextExtractor";
    public string Name => "文本提取工具";
    public string Description => "从各种文件中提取文本内容";
    public Size Size => new Size(400, 300);
    public Version Version => new(1, 0, 0);


    public Control GetUserInterface()
    {
        return new PluginDemo();
    }

    public Task InitializeAsync()
    {
        // 插件初始化逻辑
        return Task.CompletedTask;
    }

    public void Dispose()
    {
    }
}